
data = {'name': 'huyang', 'age': 12, 'city': 'shenzhen'}
res = dict()

data2 = sorted(data)   # return list

for i in data2:
    res[i] = data[i]


print(res)